import { integration } from '@/configs'

export const homeRouteName = 'Home'
export const loginRouteName = 'Login'

export const constantRoutes = [
  {
    isTokenFree: true,
    path: '/login',
    name: loginRouteName,
    component: () => integration ? import('@/views/essential/sso-login') : import('@/views/essential/login')
  },
  {
    path: '/home',
    name: homeRouteName,
    redirect: '/hbsw',
    component: () => import('@/views/essential/home')
  },
  {
    path: '/403',
    name: '403',
    component: () => import('@/views/essential/403')
  },
  {
    path: '/404',
    name: '404',
    component: () => import('@/views/essential/404')
  },
  {
    path: '/',
    name: 'Index',
    redirect: '/home'
  }
  // {
  //   path: '/pages/dmzjxs-page',
  //   name: 'DmzjxsPage',
  //   component: () => import('@/views/business/ysqjc/pages/dmzjxs-page')
  // }
  // {
  //   path: '/chart-demo',
  //   name: 'ChartDemo',
  //   isTokenFree: true,
  //   component: () => import('@/views/essential/chart-demo')
  // }
]

export const pathWhiteList = constantRoutes.map(r => r.path)
